<?php

Raise::load('core.RaiseObject');
Raise::load('core.RaiseException');

/**
 * RaiseExceptionHandler abstract class
 * Handles application-wide exceptions and errors
 *
 * @author Sam Yong
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @abstract
 * @package Raise.Exception
 * @since 1.2
 */
abstract class RaiseExceptionHandler extends RaiseObject {

    /**
     * Carries the last handled exception. This is to track and prevent recursive exception handling
     * @var Exception
     */
    protected $lastHandledException;

    /**
     * Handles all exception thrown in the application that are not handled
     * @param Exception $ex The exception caught
     */
    public abstract function exceptionHandler($ex);
    
}
